<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="../../back-common.jsp"%>
<%@ include file="/WEB-INF/pages/common/taglib.jsp"%>
        <script src="${contextPath}/resources/common/js/jquery.validate.js" type="text/javascript"></script>
        <link rel="stylesheet" type="text/css" media="screen" href="${contextPath}/resources/common/css/errorform.css" />
        <script language="javascript">

        jQuery.validator.addMethod("checkPassword", function(value, element) {
   	     var regx=/(?=.*[a-zA-Z])(?=.*[\d])[\w\W]{6,16}/;
   	     return regx.test(value);
      }, '密码由6-16为字母和数字组成');     
        
    $(document).ready(function() {
    $("#form1").validate({
        rules: {
            password: {
		        required: true,
		        minlength:6,
		        maxlength:16,
		        checkPassword:true
		    },
		    passwordag: {
		        required: true,
		        minlength:6,
		        maxlength:16,
		        equalTo:"#password"
		    }
        },
        messages: {
            password: {
                required: "请输入密码",
                minlength:"最少为6位长度",
                maxlength:"最长为16位长度"
            },
            passwordag: {
                required: "请重新输入密码",
                minlength:"最少为6位长度",
                maxlength:"最长为16位长度",
                equalTo:"两次输入的密码必须要一致"
            }
        }
    });
});
</script>
      <form:form   action="${contextPath}/admin/member/user/updatePassword" id="form1" method="post">
      	<input type="hidden" id="appNo" name="appNo" value="${param.appNo}">
       <input type="hidden" name="id" value="${bean.id }">
        <table class="${tableclass}" style="width: 100%">
	    <thead>
	    	<tr><th><strong class="am-text-primary am-text-lg">权限管理</strong> /  修改用户密码</th></tr>
	    </thead>
	    </table>
        <div align="center">
            <table  align="center" class="${tableclass}" id="col1">
      <tr>
        <td>
          <div align="center">名称 <font color="ff0000">*</font></div>
       </td>
        <td>
           <input type="text" name="name" id="name" value="${bean.name}" maxlength="30"            
        <c:if test="${not empty bean}">
            <c:out value="readonly=\"true\""></c:out>
        </c:if>  
           />
        </td>
      </tr>
      <tr>
        <td>
          <div align="center">密码 <font color="ff0000">*</font></div>
       </td>
        <td>
           <input type="password" name="password" id="password" value="" maxlength="16"/>
        </td>
      </tr>
      <tr>
        <td>
          <div align="center">确认密码 <font color="ff0000">*</font></div>
       </td>
        <td>
           <input type="password" name="passwordag" id="passwordag" value="" maxlength="16"/>
        </td>
      </tr>
       <tr>
           <td colspan="2">
               <div align="center">
    						<input class="${btnclass}" type="submit" value="提交" />
                   	<input class="${btnclass}" type="reset" value="重置" />
                   	<input class="${btnclass}" type="button" value="返回"
                       onclick="window.history.go(-1)" />
               </div>
           </td>
       </tr>
   </table>
  </div>
       
      </form:form>

